\section{my\_\-handler Class Reference}
\label{classmy__handler}\index{my_handler@{my\_\-handler}}
Inheritance diagram for my\_\-handler::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3cm]{classmy__handler}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\bf{my\_\-handler} (boost::shared\_\-ptr$<$ \bf{network::i\_\-socket} $>$ sock)\label{classmy__handler_ba53f66933b0bbd3049e0fd4eb1cf119}

\item 
virtual void \bf{handle\_\-event} (boost::shared\_\-ptr$<$ \bf{network::message} $>$ msg)
\begin{CompactList}\small\item\em handle\_\-event is called from a worker-thread if a message was received. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static boost::shared\_\-ptr$<$ \bf{my\_\-handler} $>$ \bf{create} (boost::shared\_\-ptr$<$ \bf{network::i\_\-socket} $>$ s)\label{classmy__handler_c4a3e77164e48e1100e925ac0b109165}

\end{CompactItemize}


\subsection{Detailed Description}




Definition at line 14 of file test.cpp.

\subsection{Member Function Documentation}
\index{my_handler@{my\_\-handler}!handle_event@{handle\_\-event}}
\index{handle_event@{handle\_\-event}!my_handler@{my\_\-handler}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void my\_\-handler::handle\_\-event (boost::shared\_\-ptr$<$ \bf{network::message} $>$ {\em msg})\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classmy__handler_374c19f8465bd64cee9b1a07bcd3d9f7}


handle\_\-event is called from a worker-thread if a message was received. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em n}]is the received message. \end{description}
\end{Desc}


Implements \bf{handler::event\_\-handler} \doxyref{p.}{classhandler_1_1event__handler_7ff75131a32fb17cf4addc4581344bff}.

Definition at line 29 of file test.cpp.

\begin{Code}\begin{verbatim}30         {
31                 switch(msg->type) {
32                 case network::RECEIVE:
33                         cout << "receive" << endl;
34                         cout << msg->node->to_string() << endl;
35                         break;
36                 case network::CONNECT:
37                         cout << "connect" << endl;
38                         break;
39                 case network::DELETE:
40                         cout << "delete" << endl;
41                         boost::shared_ptr<my_handler> h(_this.lock());
42                         fire_listener();
43                         h.reset();
44                         break;
45                 }
46         }
\end{verbatim}\end{Code}




The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
handler/test/test.cpp\end{CompactItemize}
